package com.rapid.maintenance.ui.activity.auctionhouse;

import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.rapid.maintenance.R;
import com.rapid.maintenance.adapter.ProcurementDemandAdapter;
import com.rapid.maintenance.base.BaseActivity;
import com.youth.banner.Banner;

import java.util.Random;

import butterknife.BindView;

public class PurchasingHallActivity extends BaseActivity {
    @BindView(R.id.banner)
    Banner banner;
    @BindView(R.id.tv_pushed)
    TextView tvPushed;
    @BindView(R.id.tv_partake)
    TextView tvPartake;
    @BindView(R.id.tv_publish)
    TextView tvPublish;
    @BindView(R.id.rv_procurement_demand)
    RecyclerView rvProcurementDemand;
    private ProcurementDemandAdapter adapter;

    @Override
    protected int provideRootLayout() {
        return R.layout.activity_purchasing_hall;
    }

    @Override
    protected void init() {
        setTitle("采购大厅");
        setStatusBarColor(0xFF016DB6);
        setToolBarColor(0xFF016DB6);
        rvProcurementDemand.setAdapter(adapter = new ProcurementDemandAdapter());
        adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                startActivity(BiddingDetailsActivity.class, new Intent().putExtra("isPublisher", new Random().nextBoolean()));
            }
        });
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.addData(new Object());
    }

}
